<%@ page contentType="text/html;charset=utf-8" %>
<jsp:include page="header.jsp">
	<jsp:param name="loginBody" value="index_body"/>
	<jsp:param name="title" value="首页"/>
</jsp:include>
<div id="header">
	<div class="logo"><a href="${requestScope.config.site_root}/admin"><img src="${requestScope.config.site_root}/static/images/logo.jpg" width="220" height="58" border="0"/></a></div>
	
	<p id="info_bar">
		用户名：<strong class="font_arial white" id="username">-</strong>，
		角色：<span id="groupname">-</span>
		| <a href="admin" class="white">后台首页</a>
		| <a href="${requestScope.config.site_root}" target="_blank" class="white">网站首页</a>
		| <a href="${requestScope.config.site_root}/admin?c=account&a=logout" class="white">退出登录</a>
	</p>
	
	<div id="menu">
		<ul>${requestScope.topmenu}</ul>
	</div>
</div>

<div id="middle">
	<h4><span id="menu_name">我的面板</span></h4>
</div>

<div id="admin_left">
	<div id="tree_box" class="p_r" style="left:6px;" >
		<div id="tree" class="tree p_a" style="top:34px;margin-top:5px;overflow:auto;overflow-x:hidden;">${requestScope.submenu}</div>
	</div>
</div>

<div id="admin_right">
	<iframe name="right" id="right" frameborder="0" src="${requestScope.config.site_root}/admin?c=welcome" style="top:0px;left:0px;height:100%;width:100%;overflow-y:scroll;background-color:#ffffff;"></iframe>
</div>
<%@ include file="footer.jsp" %>
<script type="text/javascript" src="${requestScope.config.site_root}/static/js/urlencoder.js"></script>
<script type="text/javascript">
function showMenu(pid) {
	var id = '#container_' + pid;
	var flag = '#flag_' + pid;
	$(id).css('display') == 'none' ? $(id).show() : $(id).hide();
	$(id).css('display') == 'none' ? $(flag).addClass('expandable-hitarea') : $(flag).removeClass('expandable-hitarea');
}

function showTopMenu(pid) {
	var topmenuid = 'topmenu_' + pid;
	var id = 'container_' + pid;
	$("ul[name='container']").each(function(index, obj) {
		obj.id == id ? $(obj).show() : $(obj).hide();
	});
	
	$("a[name='topmenu']").each(function(index, obj) {
		obj.id == topmenuid ? $(obj).addClass('selected') : $(obj).removeClass('selected');
	});
}

$('#username').html(URLEncoder.decode(getcookie('username')));
$('#groupname').html(URLEncoder.decode(getcookie('groupname')));
</script>